#include "qtoolbaraction.h"

#include <QDebug>
#include <QAction>

#include "mainwindow.h"
#include "sconst.h"

QToolBarAction::QToolBarAction(QWidget *parent) : QToolBar(parent)
{
  initToolBar();
}

void QToolBarAction::initToolBar()
{
/***************** EXIT ************************/
  QPixmap exit_pix(SC_IMG_APP_EXIT);
  QIcon   icon_exit(exit_pix);
  QAction *pActExit = new QAction(icon_exit, SC_EXIT, this->parent());

  pActExit->setIconVisibleInMenu(true);
  connect(pActExit, SIGNAL(triggered()), this->parentWidget(), SLOT(signalExit()));
  this->addAction(pActExit);
}
